package ServerDriver;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import DataBase.Database;
import CustomerRmi.RmiInterface;

public class Driver {
	public static void main(String [] args) {
		Database.init();
		try{   
            LocateRegistry.createRegistry(8806);   
            Database rmiImplement = new Database();
            Naming.rebind("//localhost:8806/SAMPLE-SERVER1" , rmiImplement);
        }catch (MalformedURLException me){   
            System.out.println("Malformed URL: " + me.toString());   
        }catch(RemoteException re){   
            System.out.println("Remote Exception: "+re.toString());   
        }  
	}
}
